#ifndef _SPAWN_PROCESS_H_
#define _SPAWN_PROCESS_H_

#include <uv.h>

typedef struct {
    uv_process_t ctx;
    uv_process_options_t opt;
    uv_stdio_container_t stdio[3];
    uv_pipe_t in;
    uv_pipe_t out;
    uv_pipe_t err;
    uv_read_cb on_read_stdout_cb;
    uv_read_cb on_read_stderr_cb;
    uv_exit_cb on_exit_cb;
} process_t;

void process_init(uv_loop_t *loop, process_t *process, char * cmdpath, char *cmdline[]);

#endif
